<div class="row">
	<div class="panel callout">
		<h5>Officialy Enrolled</h5>
	</div>
	
	<?if(isset($system_message))echo $system_message;?>
	
	<hr class="clearfix">
	
	<?php 
		$formAttrib = array('id' => 'addroom', 'class' => 'custom');
		$levelAttrib = array('' => 'Select student level..');
		$searchItm = array('name' => 'search_string_item[search_itm]', set_value("search_string_item[search_itm]"), 'id' => 'search_itm');
		echo form_open('search/bonafide_students', $formAttrib);
	?>
	
	<div class="row">
		<div class="small-12 large-5 columns">
			<label class="label">Student Name/ID</label>
			<?php echo form_input($searchItm);?>
		</div>
		<div class="small-12 large-5 columns">
			<label class="label">Grade Level</label>
			<?php
				if(!empty($levels)):
					echo form_dropdown('search_string_item[level_id]', $levels,set_value('search_string_item[level_id]'),'id="customDropdown1"');	
				else:
					echo 'No Levels found <br></br>';
				endif;
			?>
		</div>
		<div class="small-12 large-2 columns">
			<br/>
			<?php echo form_submit('search', 'Search Student','class="btn"'); ?>
		</div>
	</div>
	
	<?php 
		echo form_close(); 
	?>
	
	<hr class="clearfix">
</div>

<div class="row">
	<legend class="label">Search Results:</legend>
	<?=$links;?>
	<?if(!empty($students)):?>
		<table class="table table-striped table-hover">
		<thead>
		<tr>
			<th>IDNO</th>
			<th>Student Name</th>
			<th>Grade Level</th>
			<th>Nationality</th>
			<th>Date/Time Enrolled</th>
			<th>&nbsp;</th>
		</tr>
		</thead>
		<tbody>
		<?foreach($students as $k => $student):?>
		<tr>
			<td><?=$student->idno?></td>
			<td><?=ucwords($student->fullname);?></td>
			<td><?=$student->level_desc;?></td>
			<td><?=ucfirst($student->nationality);?></td>
			<td><?=$student->date_enrolled;?></td>
			<td>
				<a href="#" data-dropdown="drop<?=$k;?>" class="btn btn-mini btn-inverse dropdown tiny"><i class="icon-g-more icon-g-white"></i></a>
				<ul id="drop<?=$k;?>" class="f-dropdown">
					<?=$student_link($student->enrollment_id);?>
					<?=$delete_link($student->enrollment_id);?>
					<?=$finance_link($student->enrollment_id);?>
					<?=$registrar_link($student->enrollment_id);?>
					<?php echo $student->e_enrollee_type == 'new' ? $enrollment_transaction_slip($student->enrollment_id):''; ?>
				</ul>
			</td>
		</tr>
		<?endforeach;?>
		</tbody>
		</table>
	<?else:?>
		<div class="alert-box">
			<i class="icon-exclamation-sign icon-white"></i> Nothing found!
		</div>
	<?endif;?>
	<?=$links;?>
</div>